home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 26 / AMIGAplus Sonderheft 26 (2000)(Falke)(DE)(Track 1 of 2)[!].iso / Tools / Packer / xad / Developer / Include / Autodocs / xadmaster.doc next >
Text File  |  1999-03-29  |  23KB  |  644 lines

  1. TABLE OF CONTENTS
  2.  
  3. xadmaster.library/--general--
  4. xadmaster.library/xadAllocObject
  5. xadmaster.library/xadConvertDates
  6. xadmaster.library/xadDiskUnArc
  7. xadmaster.library/xadFileUnArc
  8. xadmaster.library/xadFreeInfo
  9. xadmaster.library/xadFreeObject
  10. xadmaster.library/xadGetClientInfo
  11. xadmaster.library/xadGetErrorText
  12. xadmaster.library/xadGetInfo
  13. xadmaster.library/xadHookAccess
  14. xadmaster.library/xadRecogFile
  15. xadmaster.library/--tags--
  16. xadmaster.library/--data hooks--
  17.  
  18. VERSION
  19.     $VER: xadmaster.doc 1.0 (07.09.1998) by SDI
  20.  
  21. xadmaster.library/--general--                   xadmaster.library/--general--
  22.  
  23.     When unachiving a archive you need to do following steps always
  24.     1) Allocate a "struct xadArchiveInfo" with a call to
  25.        xadAllocObject(XADOBJ_ARCHIVEINFO, 0). This structure is the master
  26.        interface and must not by modified in any way. Nearly all other
  27.        functions you may use need to get the pointer this this structure.
  28.        All data is passed with tags!
  29.     1) Call xadGetInfo() to find out if the input data is archived. If it
  30.        is, the xadArchiveInfo structure is filled with lots of information.
  31.        See xadGetInfo description to see what you may read and what stuff
  32.        not. One of the input tags must be specified here.
  33.     2) For every file in a file archive or every disk call xadFileUnArc() or
  34.        xadDiskUnArc() with one tag XAD_ENTRYNUMBER set to wanted entry. One
  35.        of the output tags must be specified here. Passwords and other stuff
  36.        is additionally allowed.
  37.     3) Call xadFreeInfo() to free the stuff allocated with xadGetInfo.
  38.     4) Use xadFreeObject() to free the xadArchiveInfo structure.
  39.     Do not use one xadArchiveInfo file structure for multiple input files!
  40.     
  41.     ANY needed structure must be allocated with xadAllocObject! None of
  42.     the xadmaster structures can be allocated any other way!
  43.  
  44. xadmaster.library/xadAllocObject             xadmaster.library/xadAllocObject
  45.  
  46.     NAME
  47.         xadAllocObject - Allocate memory for all xad related structures
  48.  
  49.     SYNOPSIS
  50.         ptr = xadAllocObjectA(type, tags)
  51.         D0                    D0    A0
  52.  
  53.         APTR xadAllocObjectA(ULONG, struct TagItem *)
  54.  
  55.         ptr = xadAllocObject(type, tag1, ...)
  56.  
  57.         APTR xadAllocObject(ULONG, Tag, ...)
  58.  
  59.     FUNCTION
  60.         This function allocates the memory of a needed xad related
  61.         structure and initializes it. You need to use this function to
  62.         allocate the structures. Any other way of allocating is not
  63.         allowed.
  64.  
  65.     INPUT
  66.         type    - in libraries/xadmaster.h defined XADOBJ_... types.
  67.                   For example XADOBJ_FILEINFO allocates xadFileInfo
  68.                   structure.
  69.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  70.           XAD_OBJNAMESIZE, XAD_OBJCOMMENTSIZE, XAD_OBJBLOCKENTRIES
  71.  
  72.     RESULT
  73.         ptr     - Pointer to required structure or 0 when an error occured.
  74.  
  75.     SEE ALSO
  76.         libraries/xadmaster.h, xadFreeObject(), tags section
  77.  
  78. xadmaster.library/xadConvertDates           xadmaster.library/xadConvertDates
  79.  
  80.     NAME
  81.         xadConvertDates - convert between date storage methods
  82.  
  83.     SYNOPSIS
  84.         result = xadConvertDatesA(tags)
  85.         D0                         A0
  86.  
  87.     LONG xadConvertDates(struct TagItem *)
  88.  
  89.         result = xadConvertDates(tag1, ...)
  90.  
  91.     LONG xadConvertDates(Tag, ...)
  92.  
  93.     FUNCTION
  94.     This function can be used to transfrom date and time between
  95.     different storage systems. One of the input tags must be specified.
  96.     Output tags may be specified multiple. The date information is
  97.     based on Gregorian calendar. Some systems can store a wider range
  98.     of dates than others. If a date produces an overflow or an
  99.     underflow for a special date, the highest/lowest valid date is used
  100.     (e.g. for timevalues 0x00000000 or 0xFFFFFFFF).
  101.     The UNIXUTC date needs locale.library to get the offset to local
  102.     time. If locale.library cannot be opened the offset is set to 0.
  103.     XAD_DATECURRENTTIME can be used to get the current system date and
  104.     time.
  105.     WeekDay information is ignored for input and always recalculated.
  106.     The calculation routines use full range of available variable space,
  107.     so f.e. a Unix date 1.1.1970 00:00:00 (value 0x00000000) with a
  108.     UTC offset of -30 min produces 31.12.1968 23:30:00.
  109.  
  110.     INPUT
  111.     ai    - the master communication structure
  112.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  113.           XAD_DATEUNIXUTC, XAD_DATEAMIGA, XAD_DATEDATESTAMP,
  114.               XAD_DATEXADDATE, XAD_DATECLOCKDATA, XAD_DATECURRENTTIME,
  115.               XAD_GETDATEUNIXUTC, XAD_GETDATEAMIGA,
  116.               XAD_GETDATEDATESTAMP, XAD_GETDATEXADDATE,
  117.               XAD_GETDATECLOCKDATA
  118.  
  119.     RESULT
  120.         result    - any of the XADERR codes or zero when all is ok.
  121.  
  122.     SEE ALSO
  123.         libraries/xadmaster.h, tags section
  124.  
  125. xadmaster.library/xadDiskUnArc                 xadmaster.library/xadDiskUnArc
  126.  
  127.     NAME
  128.         xadDiskUnArc - the master function for unarchiving disks
  129.  
  130.     SYNOPSIS
  131.         result = xadDiskUnArcA(ai, tags)
  132.         D0                    A0   A1
  133.  
  134.     LONG xadDiskUnArc(struct xadArchiveInfo *, struct TagItem *)
  135.  
  136.         result = xadDiskUnArc(ai, tag1, ...)
  137.  
  138.     LONG xadDiskUnArc(struct xadArchiveInfo *, Tag, ...)
  139.  
  140.     FUNCTION
  141.     This function dearchives a disk archive. It can be called after
  142.     a succesful call to xadGetInfo. At least the tag XAD_ENTRYNUMBER
  143.     and one of the output tags needs to be supplied. When a progress
  144.     hook is supplied, this can be used for questioning for overwriting
  145.     and ignoring of drive geometry and for status displays.
  146.     Normally disk archivers will have only one entry, but there may
  147.     be multiple disk archives.
  148.  
  149.     INPUT
  150.     ai    - the master communication structure
  151.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  152.                 XAD_ENTRYNUMBER, XAD_OUTFILEHANDLE, XAD_OUTFILENAME,
  153.           XAD_OUTHOOK, XAD_OUTMEMORY, XAD_OUTSIZE, XAD_OVERWRITE,
  154.           XAD_PROGRESSHOOK, XAD_IGNOREGEOMETRY, XAD_HIGHCYLINDER,
  155.           XAD_LOWCYLINDER, XAD_OUTDEVICE, XAD_PASSWORD
  156.  
  157.  
  158.     RESULT
  159.         result    - any of the XADERR codes or zero when all is ok.
  160.  
  161.     SEE ALSO
  162.         libraries/xadmaster.h, xadFileUnArc(), xadGetInfo(), tags section
  163.  
  164. xadmaster.library/xadFileUnArc                 xadmaster.library/xadFileUnArc
  165.  
  166.     NAME
  167.         xadFileUnArc - the master function for unarchiving disks
  168.  
  169.     SYNOPSIS
  170.         result = xadFileUnArcA(ai, tags)
  171.         D0                    A0   A1
  172.  
  173.     LONG xadFileUnArc(struct xadArchiveInfo *, struct TagItem *)
  174.  
  175.         result = xadFileUnArc(ai, tag1, ...)
  176.  
  177.     LONG xadFileUnArc(struct xadArchiveInfo *, Tag, ...)
  178.  
  179.     FUNCTION
  180.     This function dearchives a file archive entry. It can be called
  181.     after a succesful call to xadGetInfo. At least the tag
  182.     XAD_ENTRYNUMBER and one of the output tags needs to be supplied.
  183.     When a progress hook is supplied, this can be used for questioning
  184.     for overwriting and for status displays.
  185.     This function needs to be called for every file, which should be
  186.     unarchived. Best is to do unarchiving in direction giving by
  187.     info structure, because some archivers crunch multiple files in one
  188.     pass and the unarchiver needs to compress and buffer the whole
  189.     pass to get one file.
  190.  
  191.     INPUT
  192.     ai    - the master communication structure
  193.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  194.                 XAD_ENTRYNUMBER, XAD_OUTFILEHANDLE, XAD_OUTFILENAME,
  195.           XAD_OUTHOOK, XAD_OUTMEMORY, XAD_OUTSIZE, XAD_OVERWRITE,
  196.           XAD_PROGRESSHOOK, XAD_PASSWORD
  197.  
  198.     RESULT
  199.         result    - any of the XADERR codes or zero when all is ok.
  200.  
  201.     SEE ALSO
  202.         libraries/xadmaster.h, xadDiskUnArc(), xadGetInfo(), tags section
  203.  
  204. xadmaster.library/xadFreeInfo                   xadmaster.library/xadFreeInfo
  205.  
  206.     NAME
  207.         xadFreeInfo - free stuff built and allocated with xadGetInfo()
  208.  
  209.     SYNOPSIS
  210.         xadFreeInfo(ai)
  211.                     A0
  212.  
  213.         void xadFreeInfo(struct xadArchiveInfo *)
  214.  
  215.     FUNCTION
  216.         Frees all the stuff built and allocated by a call to xadGetInfo().
  217.     You always need to call this after your work with a certain input
  218.     file is finished.
  219.  
  220.     INPUTS
  221.         ai    - the master communication structure
  222.  
  223.     SEE ALSO
  224.         libraries/xadmaster.h, xadGetInfo(), tags section
  225.  
  226. xadmaster.library/xadFreeObject               xadmaster.library/xadFreeObject
  227.  
  228.     NAME
  229.         xadFreeObject - Frees structures allocated with xadAllocObject()
  230.  
  231.     SYNOPSIS
  232.         xadFreeObjectA(object, tags)
  233.                          A0      A1
  234.  
  235.         void xadFreeObjectA(APTR, struct TagItem *)
  236.  
  237.         xadFreeObject(object, tag1, ...)
  238.  
  239.         void xadFreeObject(APTR, Tag, ...)
  240.  
  241.     FUNCTION
  242.         Frees object allocated by xadAllocObject(). Do not call for objects
  243.         allocated in any other way.
  244.  
  245.     INPUTS
  246.         object    - object allocated with xadAllocObject()
  247.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  248.           currently none
  249.  
  250.     SEE ALSO
  251.         libraries/xadmaster.h, xadAllocObject(), tags section
  252.  
  253. xadmaster.library/xadGetClientInfo         xadmaster.library/xadGetClientInfo
  254.  
  255.     NAME
  256.         xadGetClientInfo - Get list of active clients
  257.  
  258.     SYNOPSIS
  259.         ptr = xadGetClientInfo()
  260.         D0
  261.  
  262.         struct xadClient *xadGetClientInfo(void)
  263.  
  264.     FUNCTION
  265.     This function returns a list of all active clients. It can be used
  266.     to show information about the library. The list is read only and
  267.     cannot be modified!
  268.  
  269.     RESULT
  270.         ptr    - Pointer to first client in the list.
  271.  
  272.     SEE ALSO
  273.         libraries/xadmaster.h
  274.  
  275. xadmaster.library/xadGetErrorText           xadmaster.library/xadGetErrorText
  276.  
  277.     NAME
  278.         xadGetErrorText - Get error string from an error number
  279.  
  280.     SYNOPSIS
  281.         ptr = xadGetErrorText(errnum)
  282.         D0                    D0
  283.  
  284.         STRPTR xadGetErrorText(ULONG)
  285.  
  286.     FUNCTION
  287.     This function returns the error string related to the supplied
  288.     error number. This string is valid as long as xadmaster.library
  289.     is opened, so when needed any longer time it must be copied.
  290.  
  291.     INPUT
  292.         errnum    - in libraries/xadmaster.h defined XADERR_... numbers.
  293.  
  294.     RESULT
  295.         ptr    - Pointer to required string.
  296.  
  297.     SEE ALSO
  298.         libraries/xadmaster.h
  299.  
  300. xadmaster.library/xadGetInfo                     xadmaster.library/xadGetInfo
  301.  
  302.     NAME
  303.         xadGetInfo - get information about an archive
  304.  
  305.     SYNOPSIS
  306.         result = xadGetInfoA(ai, tags)
  307.         D0                    A0   A1
  308.  
  309.     LONG xadGetInfo(struct xadArchiveInfo *, struct TagItem *)
  310.  
  311.         result = xadGetInfo(ai, tag1, ...)
  312.  
  313.     LONG xadGetInfo(struct xadArchiveInfo *, Tag, ...)
  314.  
  315.     FUNCTION
  316.     This function returns all useful information about a specified
  317.     archive. It opens the archive for working. You may call
  318.     xadFileUnArc() or xadDiskUnArc() for the included entries
  319.     after a successful call to xadGetInfo. The data must be freed
  320.     by a call to xadFreeInfo(). After that the xadArchiveInfo structure
  321.     must be freed and NEVER be used again! For archives encrypting
  322.     the information parts as well, you need to specify XAD_PASSWORD.
  323.     This password can be used for all calls to a unarchiving function,
  324.     but is overwritten by XAD_PASSWORD tag argument (only for the
  325.     entry XAD_PASSWORD is specified).
  326.  
  327.     INPUT
  328.     ai    - the master communication structure
  329.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  330.           XAD_INSIZE, XAD_INFILENAME, XAD_INFILEHANDLE,
  331.           XAD_INMEMORY, XAD_INHOOK, XAD_PASSWORD
  332.  
  333.     RESULT
  334.         result    - any of the XADERR codes or zero when all is ok.
  335.  
  336.     SEE ALSO
  337.         libraries/xadmaster.h, xadFreeInfo(), xadDiskUnArc(),
  338.         xadFileUnArc(), tags section
  339.  
  340. xadmaster.library/xadHookAccess               xadmaster.library/xadHookAccess
  341.  
  342.     NAME
  343.         xadHookAccess - a client only function to get/store data
  344.  
  345.     SYNOPSIS
  346.         result = xadHookAccess(command, data, buffer, ai)
  347.         D0                       D0      D1     A0    A1
  348.  
  349.     LONG xadHookAccess(ULONG, LONG, APTR, struct xadArchiveInfo *)
  350.  
  351.     FUNCTION
  352.     This function is for external clients only. It is needed to get
  353.     data, store results and seek in input or output. There are 5
  354.     commands XADAC_READ, XADAC_WRITE, XADAC_COPY, XADAC_INPUTSEEK,
  355.     XADAC_OUTPUTSEEK to do that. This function updates the xai_InPos,
  356.     xai_OutPos and xai_OutSize fields in xadArchiveInfo structure. The
  357.     seek commands and the copy command should set buffer parameter to
  358.     zero. Seek's and reads should not exceed the file borders! The
  359.     client knows position and size, so checks are possible before doing
  360.     wrong commands.
  361.  
  362.     INPUT
  363.         command - one of the XADAC command to control hook
  364.         data    - the required data, mostly a size value
  365.         buffer    - the input/output buffer for read and write
  366.     ai    - the master communication structure
  367.  
  368.     RESULT
  369.         result    - any of the XADERR codes or zero when all is ok.
  370.  
  371.     SEE ALSO
  372.         libraries/xadmaster.h
  373.  
  374. xadmaster.library/xadRecogFile                 xadmaster.library/xadRecogFile
  375.  
  376.     NAME
  377.         xadRecogFile - check if a file is an archive file or not
  378.  
  379.     SYNOPSIS
  380.         client = xadRecogFileA(size, memory, tags)
  381.         D0                     D0     A0     A1
  382.  
  383.         struct xadClient *xadRecogFileA(ULONG, APTR, struct TagItem *)
  384.  
  385.         client = xadRecogFileA(size, memory, tag1, ...)
  386.  
  387.         struct xadClient *xadRecogFileA(ULONG, APTR, Tag, ...)
  388.  
  389.     FUNCTION
  390.     This function can be used to check if a file is a archive or not.
  391.     It has only limited abilities! You need to pass a pointer to
  392.     memory of recogsize. The recogsize value can be found in
  393.     xadMasterBase. If the file is shorter, use the complete file as
  394.     buffer. Longer buffers are allowed as well. When the file is
  395.     archived, you get back a pointer to the client which detected the
  396.     file. If not, the return is zero. The only usable information
  397.     should be the name of the client. To get more information and all
  398.     archive related data you have to use xadGetInfo, which calls
  399.     xadRecogFile internal itself.
  400.  
  401.     INPUT
  402.         size    - size of the memory region
  403.     memory    - pointer to the memory holding the file
  404.         tags    - Pointer to an array of struct TagItem. Recognized tags: 
  405.           XAD_NOEXTERN
  406.  
  407.     RESULT
  408.         client    - pointer to client structure or zero when no archive
  409.  
  410.     SEE ALSO
  411.         libraries/xadmaster.h, xadGetInfo(), tags section
  412.  
  413. xadmaster.library/--tags--                         xadmaster.library/--tags--
  414.  
  415.     TAGS FOR xadAllocObject
  416.  
  417.       XAD_OBJBLOCKENTRIES    (ULONG)
  418.     Can be specified together with XADOBJ_DISKINFO. This allocates
  419.     memory for xdi_BlockInfo. Data field of tag item contains number
  420.     of required blocks.
  421.  
  422.       XAD_OBJCOMMENTSIZE    (ULONG)
  423.     Like XAD_OBJNAMESIZE, but allocates memory for xfi_Comment entry.
  424.  
  425.       XAD_OBJNAMESIZE        (ULONG)
  426.     Can be specified together with XADOBJ_FILEINFO. This allocates
  427.     memory for storing file name. The required size has to be stored
  428.     in data field of tag item. The allocated memory pointer is stored
  429.     in xfi_FileName field of returned structure. Memory gets freed
  430.     automatically, when object is freed.
  431.  
  432.     TAGS FOR xadGetInfo
  433.  
  434.       XAD_INFILEHANDLE        (BPTR)
  435.     FileHandle to get data from. It is not necessary that the handle
  436.     is at the beginning of the file.
  437.  
  438.       XAD_INFILENAME        (STRPTR)
  439.     Name of the input file.
  440.  
  441.       XAD_INHOOK        (struct Hook *)
  442.     This enables any other way of data delivering. See special
  443.     chapter on I/O hook functions.
  444.  
  445.       XAD_INMEMORY        (STRPTR)
  446.         Pointer to a memory buffer holding the input data. You need to
  447.         specify XAD_INSIZE when using this.
  448.  
  449.       XAD_INSIZE        (ULONG)
  450.     Specify the size of input data. Must be used together with
  451.     XAD_INMEMORY. Can be used together with other hooks.
  452.  
  453.     TAGS FOR xadFileUnArc and xadDiskUnArc
  454.  
  455.       XAD_ENTRYNUMBER        (ULONG)
  456.     This flag specifies the wanted entry. You must not specify more
  457.     or less than one of that flag every call.
  458.  
  459.       XAD_MAKEDIRECTORY        (BOOL)
  460.     Create missing directory tree when necessary.
  461.  
  462.       XAD_OUTFILEHANDLE        (BPTR)
  463.     FileHandle to send data to. It is not necessary that the handle
  464.     is at the beginning of the file.
  465.  
  466.       XAD_OUTFILENAME        (STRPTR)
  467.     Name of the output file.
  468.  
  469.       XAD_OUTHOOK        (struct Hook *)
  470.     This enables any other way of data storing. See special chapter
  471.     on I/O hook functions.
  472.  
  473.       XAD_OUTMEMORY        (STRPTR)
  474.         Pointer to a memory buffer to store data in. You need to specify
  475.         XAD_OUTSIZE when using this.
  476.  
  477.       XAD_OUTSIZE        (ULONG)
  478.     Specify the maximum size of output data. Must be used together with
  479.     XAD_OUTMEMORY.
  480.  
  481.       XAD_OVERWRITE        (BOOL)
  482.     This forces the file hook to overwrite existing destination files.
  483.  
  484.       XAD_PROGRESSHOOK        (struct Hook *)
  485.     The progress hook for status displays. This hook can be used to
  486.     do display completion reports or ask the user. It gets a pointer
  487.     to a xadProgressInfo structure. The hook returns a combination
  488.     of XADPIF flags. A value of zero means a break command.
  489.     The xpi_Status field must be checked and handled when XADPMODE_ASK
  490.     is used. When XADPIF_OVERWRITE is set, the hook must determine if
  491.     the file should be overwritten or not. The return flag
  492.     XADPIF_OVERWRITE must be set corresponding to this decision. Same
  493.     is for XADPIF_IGNORGEGEOMETRY and XADPIF_MAKEDIRECTORY flag.
  494.  
  495.     TAGS FOR xadDiskUnArc
  496.  
  497.       XAD_IGNOREGEOMETRY    (BOOL)
  498.     This forces the device hook to use devices with different drive
  499.     geometry than the one on disk archive. Most time this will produce
  500.     useless disks.
  501.  
  502.       XAD_HIGHCYLINDER        (ULONG)
  503.     It specifies the highest cylinder which should be unarchived.
  504.  
  505.       XAD_LOWCYLINDER        (ULONG)
  506.     It specifies the lowest cylinder which should be unarchived.
  507.  
  508.       XAD_OUTDEVICE        (struct xadDeviceInfo *)
  509.     For disk archives it is useful to store data directly on a disk.
  510.     Use this tag to specify the device where data should be stored.
  511.         In fields xdi_DeviceName and xdi_Unit the wanted device must be
  512.         specified. The device must support TD_GETGEOMETRY command, even
  513.         if XAD_IGNOREGEOMETRY is turned on, as the hook needs at least
  514.         the blocksize for internal buffering.
  515.         Alternatively xdi_DOSName can be used, but must not be terminated
  516.         with a ':' character.
  517.  
  518.     TAGS FOR xadConvertDates
  519.  
  520.       XAD_DATEUNIXUTC        (ULONG)
  521.     Input is an UNIX date value (seconds starting with 01.01.1970).
  522.     The time is interpreted as UTC/GMT time and when locale.library
  523.     exists it is correct by offset in minutes to get local time.
  524.  
  525.       XAD_DATEAMIGA        (ULONG)
  526.     Input as an Amiga date value (seconds starting with 01.01.1978).
  527.  
  528.       XAD_DATEDATESTAMP        (struct DateStamp *)
  529.     Input is a pointer to an Amiga DateStamp structure.
  530.  
  531.       XAD_DATEXADDATE        (struct xadDate *)
  532.     Input is a pointer to a xadmaster date structure.
  533.  
  534.       XAD_DATECLOCKDATA        (struct ClockData *)
  535.     Input is a pointer to a ClockData structure.
  536.  
  537.       XAD_DATECURRENTTIME    (void)
  538.     Current system time value should be used as input.
  539.  
  540.       XAD_GETDATEUNIXUTC    (ULONG *)
  541.     An UNIX time value should be stored in the ULONG variable, the
  542.     supplied pointer points to.
  543.  
  544.       XAD_GETDATEAMIGA        (ULONG *)
  545.     An Amiga time value should be stored in the ULONG variable, the
  546.     supplied pointer points to.
  547.  
  548.       XAD_GETDATEDATESTAMP    (struct DateStamp *)
  549.     The date should be stored in DateStamp structure the supplied
  550.     pointer points to.
  551.  
  552.       XAD_GETDATEXADDATE    (struct xadDate *)
  553.     The date should be stored in xadmaster date structure the supplied
  554.     pointer points to.
  555.  
  556.       XAD_GETDATECLOCKDATA    (struct ClockData *)
  557.     The date should be stored in ClockData structure the supplied
  558.     pointer points to.
  559.  
  560.     TAGS FOR different functions
  561.  
  562.       XAD_NOEXTERN        (BOOL)
  563.     When this is specified for xadGetInfo or xadRecogFile, the library
  564.     skips any external clients.
  565.  
  566.       XAD_PASSWORD        (STRPTR)
  567.     You may supply a password for xadGetInfo, xadFileUnArc and
  568.     xadDiskUnArc functions.
  569.  
  570. xadmaster.library/-- data hooks--            xadmaster.library/--data hooks--
  571.  
  572.     GENERAL
  573.     You have four methods of passing data to xadmaster.library: file-
  574.     names, filehandles, memory areas and hooks. The hooks are described
  575.     here. The hook field h_Entry has to be standard hook functions and
  576.     gets called with the hook itself in A0 and a pointer to a
  577.     xadHookParam in A1. Commands are stored in xhp_Command field, data
  578.     in the other fields. Return values are 0 or any of the XADERR codes.
  579.     Unsupported commands are returned with XADERR_NOTSUPPORTED.
  580.  
  581.     You may store a pointer to private data in the field xhp_PrivatePtr.
  582.     You always get a XADHC_FREE after work to enable you freeing your
  583.     resources.
  584.  
  585.     Whenever an error occured, the hook gets called with XADHC_ABORT.
  586.     Use this to delete partial file, free useless memory or whatever
  587.     you used. You must not do cleanup stuff on XADHC_ABORT call, as 
  588.     XADHC_FREE call follows after it.
  589.     
  590.         NOTE: Because hooks are not called in program environment, they
  591.         cannot be used in small data model of some compilers, as register
  592.         A4 is not passed through. So the hook either has to be compiled in
  593.         large data model or should use __saveds keyword of some compilers.
  594.  
  595.     COMMANDS
  596.       XADHC_READ        (input hooks only)
  597.     This command is called all time xadmaster.library needs some data.
  598.     Fill the supplied memory area with input data of needed size.
  599.     Input:    xhp_BufferSize    size of required data
  600.         xhp_BufferPtr    buffer to fill
  601.     Output:    xhp_DataPos    buffer position after read
  602.  
  603.       XADHC_WRITE        (output hooks only)
  604.     This function is called, when some data should be stored. Copy
  605.     the contents of buffer to your data storing system.
  606.     Input:    xhp_BufferSize    size of data
  607.         xhp_BufferPtr    pointer to memory area
  608.     Output:    xhp_DataPos    buffer position after write
  609.  
  610.       XADHC_SEEK        (both)
  611.     Change the current position in your data (like dos.library Seek
  612.     command). The offset you have to seek is always relative to
  613.     current position. It can be negative too. Seek's with size 0 can
  614.     be used to get current file position.
  615.     Input:    xhp_CommandData    offset you have to seek
  616.     Output:    xhp_DataPos    buffer position after seek
  617.  
  618.       XADHC_INIT        (both)
  619.     The work starts. Allocate needed structures and initialize your
  620.     stuff. Clear xhp_BufferPos.
  621.     Input:    none
  622.     Output:    none
  623.  
  624.       XADHC_FREE        (both)
  625.     You get this when work is finished, free all your stuff now. You
  626.     need to clear all pointers you use for checking, as it may happen
  627.     that you get multiple XADHC_FREE commands.
  628.     Input:    none
  629.     Output:    none
  630.  
  631.       XADHC_ABORT        (output hooks only)
  632.     You get this when work was aborted, because an error occured.
  633.     Free all work stuff. Buffers must be freed by later XADHC_FREE call.
  634.     Be prepared to get multiple XADHC_ABORT commands.
  635.     Input:    none
  636.     Output:    none
  637.  
  638.       XADHC_FULLSIZE        (input hooks only)
  639.     The hook should return complete size of input data which should be
  640.     processed.
  641.     Input:    none
  642.     Output:    xhp_CommandData    size of input file
  643.  
  644.